<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>xml (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">dom.xml</span>
</div>

<hr/>


  <h2>Classes</h2>
   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>




  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.xml.createDocument"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">createDocument<span class="args">(<span class="arg">opt_rootTagName</span>,&nbsp;<span class="arg">opt_namespaceUri</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/DOM/document">Document</a></span>
      </div>


     <div class="entryOverview">
       Creates an XML document appropriate for the current JS runtime

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_rootTagName</span>
        : <span class="type">string=</span>
        <div class="entryOverview">The root tag name.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_namespaceUri</span>
        : <span class="type">string=</span>
        <div class="entryOverview">Namespace URI of the document element.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/DOM/document">Document</a></span>&nbsp;
            The new document.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line47">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.dom.xml.createMsXmlDocument_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">createMsXmlDocument_<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/DOM/document">Document</a></span>
      </div>


     <div class="entryOverview">
       Creates an instance of the MSXML2.DOMDocument.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/DOM/document">Document</a></span>&nbsp;
            The new document.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line183">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.xml.loadXml"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">loadXml<span class="args">(<span class="arg">xml</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/DOM/document">Document</a></span>
      </div>


     <div class="entryOverview">
       Creates an XML document from a string

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">xml</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The text.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/DOM/document">Document</a></span>&nbsp;
            XML document from the text.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line75">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.xml.selectNodes"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">selectNodes<span class="args">(<span class="arg">node</span>,&nbsp;<span class="arg">path</span>)</span>
        </span>
        &#8658; (<span class="type">NodeList,Array</span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>&gt;)
      </div>


     <div class="entryOverview">
       Selects multiple nodes using an Xpath expression and a root node

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">node</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
        <div class="entryOverview">The root node.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">path</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">Xpath selector.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;(<span class="type">NodeList,Array</span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>&gt;)&nbsp;
            The selected nodes, or empty array if no
    matching nodes.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line137">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.xml.selectSingleNode"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">selectSingleNode<span class="args">(<span class="arg">node</span>,&nbsp;<span class="arg">path</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
      </div>


     <div class="entryOverview">
       Selects a single node using an Xpath expression and a root node

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">node</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
        <div class="entryOverview">The root node.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">path</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">Xpath selector.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>&nbsp;
            The selected node, or null if no matching node.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line112">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.xml.serialize"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">serialize<span class="args">(<span class="arg">xml</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
      </div>


     <div class="entryOverview">
       Serializes an XML document or subtree to string.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">xml</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/document">Document</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span>
        <div class="entryOverview">The document or the root node of the subtree.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&nbsp;
            The serialized XML.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line92">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.xml.setAttributes"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">setAttributes<span class="args">(<span class="arg">element</span>,&nbsp;<span class="arg">attributes</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets multiple attributes on an element. Differs from goog.dom.setProperties
in that it exclusively uses the element's setAttributes method. Use this
when you need to ensure that the exact property is available as an attribute
and can be read later by the native getAttribute method.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">element</span>
        : <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span>
        <div class="entryOverview">XML or DOM element to set attributes on.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">attributes</span>
        : <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>,<span class="type"> string</span>&gt;
        <div class="entryOverview">Map of property:value pairs.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line169">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



  <h2>Global Properties</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.dom.xml.MAX_ELEMENT_DEPTH"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">MAX_ELEMENT_DEPTH</span>
        : 
     </div>


     <div class="entryOverview">
       Max XML size for MSXML2.  Used to prevent potential DoS attacks.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line38">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.dom.xml.MAX_XML_SIZE_KB"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.dom.xml.</span><span class="entryName">MAX_XML_SIZE_KB</span>
        : 
     </div>


     <div class="entryOverview">
       Max XML size for MSXML2.  Used to prevent potential DoS attacks.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_dom_xml.js.source.html#line31">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package dom</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="dom.xml"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
